<script setup>
import {ref} from 'vue'



import EmojiPicker from 'vue3-emoji-picker'
import 'vue3-emoji-picker/css'


var input = ref("")
var emoji  =ref("")

 function onSelectEmoji(emoji) {
  console.log(emoji)
  input.value +=emoji.i;
  /*
    // result
    { 
        i: "😚", 
        n: ["kissing face"], 
        r: "1f61a", // with skin tone
        t: "neutral", // skin tone
        u: "1f61a" // without tone
    }
    */
}
</script>

<template>
    <div>
        <textarea v-model="input"></textarea>

        <EmojiPicker :native="true" @select="onSelectEmoji" />
    
    </div>
</template>